package edu.sctu.nieyu.day20150606.day201506062;

import java.util.Calendar;

/**
 * Created by user01 on 2015/6/6.
 */
public class Test {
    private Long poor;
    public Test(){
        Calendar calendar = Calendar.getInstance();
        Calendar calendar1 = Calendar.getInstance();
        calendar1.set(2015,05,05,11,23);
        System.out.println(calendar1.getTime());
        poor = Math.abs(calendar.getTime().getTime()-calendar1.getTime().getTime());
    }

    public void getTime(){
        System.out.println(poor+"毫秒");
        System.out.println(poor/1000+"秒");
        System.out.println(poor/(60*1000)+"分");
        System.out.println(poor/(60*1000*60)+"时");

    }
}
